<template>
  <div class="order-header">
    <div class="container clearfix">
      <div class="header-logo fl">
        <a href="/#/index"></a>
      </div>
      <div class="title fl">
        <h2>{{title}}</h2>
        <slot name="tip"></slot>
      </div>
      <div class="username fr">{{username}}</div>
    </div>
  </div>
</template>

<script>
  import { mapState } from 'vuex'
  export default {
    name: 'order-header',
    props: {
      title: String
    },
    computed: {
      ...mapState(['username'])
    }
  }
</script>

<style lang='scss'>
@import "./../assets/scss/config.scss";
@import "./../assets/scss/base.scss";
.order-header{
  border-bottom: 2px solid $colorA;
  .container{
    padding: 30px 0;
    .title{
      line-height: 55px;
      margin-left: 54px;
      h2{
        display: inline-block;
        font-size: $fontC;
      }
      .tips{
        display: inline-block;
        font-size: $fontJ;
        color: #999;
        margin-left: 17px;
      }
    }
    .username{
      line-height: 55px;
      font-size: $fontJ;
      color: #999;
      cursor: pointer;
    }
  }
}
</style>